package com.xmy.cultivate.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 排位详细
 * </p>
 *
 * @author hpiggy
 * @since 2023-05-16
 */
@Data
@TableName("staff_ranking_detail")
@ApiModel(value = "StaffRankingDetail对象", description = "排位详细")
public class StaffRankingDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private Long id;

    @ExcelIgnore
    @ApiModelProperty("员工(教师)id")
    private Long staffId;

    @ExcelProperty(index = 0,value = "姓名")
    @ApiModelProperty("员工(教师)名称")
    private String staffName;

    @ExcelIgnore
    @ApiModelProperty("排位名称（对应staff_ranking表id）")
    private Long staffRankingId;

    @ExcelProperty(index = 1,value = "名次")
    @ApiModelProperty("排位名序（如：第一名为：1，第二名为：2）")
    private Integer rankingNum;

    @ExcelIgnore
    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ExcelIgnore
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @ExcelIgnore
    @TableField(fill = FieldFill.DEFAULT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deletedAt;

    @ExcelIgnore
    @ApiModelProperty("角色")
    @TableField(exist = false)
    private String roleName;

    @ExcelIgnore
    @ApiModelProperty("排位日期")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date rankingDate;

    @ExcelIgnore
    @ApiModelProperty("排位年份")
    @TableField(exist = false)
    private Integer year;

    @ExcelIgnore
    @ApiModelProperty("排位名称")
    @TableField(exist = false)
    private String staffRankingName;

    @ExcelIgnore
    @ApiModelProperty("进退步情况")
    @TableField(exist = false)
    public String circumstance;

    @ExcelIgnore
    @ApiModelProperty("名次变化")
    @TableField(exist = false)
    private Integer ranking;

}
